{extend name="public:base" /}
{block name="content"}
<div class="page-header">
	<h1>
		{$breadcrumb1}
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$breadcrumb2}
		</small>
		<small>
			<i class="ace-icon fa fa-angle-double-right"></i>
			{$crumbs}
		</small>			
	
	</h1>
</div>

<div class="row">
	<div class="col-xs-12">	
		
		<div class="form-horizontal">
			
			{if condition="$Request.param.id"}
			<input name="slide_id" type="hidden" value="{$Request.param.id}" />
			{/if}
			
			<div class="form-group">
                <label class="col-sm-1 control-label" for="input-image">
                	图片
                </label>	                
	            <div class="col-sm-10" id="thumb">
	                  <a id="thumb-image" href="#" data-toggle="image" class="img-thumbnail">
		                  	{if condition="isset($d['image'])"}
		                  		<img src="IMG_ROOT{$d.image|resize=100,100}" />
		                  	{else /}
		                  		<img src="__PUBLIC__/image/no_image_100x100.jpg" />
		                  	{/if}
							</a>
	                  <input type="hidden" name="image" value="{$d.image|default=''}" id="input-image" />
	            </div>		            
		    </div> 
			
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left">标题</label>
			<div class="col-sm-5">
				<div class="clearfix">
				<input name="title" class="col-xs-10 col-sm-5"  value="{$d.title|default=''}" type="text">
				</div>
			</div>
			</div>
			<div class="space-4"></div>
			
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left">电脑端链接</label>
			<div class="col-sm-5">
				<div class="clearfix">
				<input name="pc_url" class="col-xs-10 col-sm-5"  value="{$d.pc_url|default=''}" type="text">
				</div>
			</div>
			</div>
			<div class="space-4"></div>
			
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left">手机端链接</label>
			<div class="col-sm-5">
				<div class="clearfix">
				<input name="mobile_url" class="col-xs-10 col-sm-5"  value="{$d.mobile_url|default=''}" type="text">
				</div>
			</div>
			</div>
			<div class="space-4"></div>
			
			
			<div class="form-group">
				<label class="col-sm-1 control-label no-padding-left"> </label>	
				<div class="col-sm-11">
					<input id="send" name="send" type="submit" value="提交" class="btn btn-primary" />
				</div>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="javascript"}
<script>
var back_index="{:url('PluginSlide/index')}";
$('#send').click(function(){
	$.post(
		'{$action}',
		$('.form-horizontal input[type=\'text\'],.form-horizontal input[type=\'hidden\']'),
		function(d){
			art_dialog(d,back_index);
		}
	);
});
</script>							
{/block}